using System;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureContrib.WindowsAzure.StorageClient
{
	/// <summary>
	/// An abstraction over <see cref="CloudQueueWrapper"/>
	/// </summary>
	public interface ICloudQueue
	{
		/// <summary>
		/// <see cref="CloudQueue.AddMessage(CloudQueueMessage)"/>
		/// </summary>
		/// <param name="message"></param>
		void AddMessage(CloudQueueMessage message);

		/// <summary>
		/// <see cref="CloudQueueWrapper.GetMessage(TimeSpan)"/>
		/// </summary>
		CloudQueueMessage GetMessage(TimeSpan visibilityTimeout);

		/// <summary>
		/// <see cref="CloudQueueWrapper.DeleteMessage(CloudQueueMessage)"/>
		/// </summary>
		void DeleteMessage(CloudQueueMessage message);

		/// <summary>
		/// <see cref="CloudQueueWrapper.PeekMessage"/>
		/// </summary>
		CloudQueueMessage PeekMessage();

		/// <summary>
		/// <see cref="CloudQueueWrapper.CreateIfNotExist"/>
		/// </summary>
		bool CreateIfNotExist();

		/// <summary>
		/// <see cref="CloudQueue.Exists"/>
		/// </summary>
		/// <returns>True if the queue exits</returns>
		bool Exists();

		/// <summary>
		/// <see cref="CloudQueue.Delete"/>
		/// </summary>
		void Delete();
	}
}